package com.xd.user.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.xd.common.base.BaseModel;
import com.xd.common.constant.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author Exrick
 */
@Data
@Accessors(chain = true)
@Entity
@Table(name = "xd_department_header")
@org.hibernate.annotations.Table(appliesTo = "xd_department_header",comment = "部门负责人")
@TableName("xd_department_header")
@ApiModel(value = "部门负责人")
public class DepartmentHeader extends BaseModel<DepartmentHeader> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "关联部门id")
    @Column( nullable = false, columnDefinition = "varchar(255) default '' comment '关联部门id'")
    private String departmentId;

    @ApiModelProperty(value = "关联部门负责人")
    @Column( nullable = false, columnDefinition = "varchar(100) default '' comment '关联部门负责人'")
    private String userId;

    @ApiModelProperty(value = "负责人类型 默认0主要 1副职")
    @Column( nullable = false, columnDefinition = "tinyint(2) default 1 comment '负责人类型 默认0主要 1副职'")
    private Integer type = CommonConstant.HEADER_TYPE_VICE;
}
